<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>填写核对订单信息</title>
	<link rel="stylesheet" href="{:config('home_static')}/style/base.css" type="text/css">
	<link rel="stylesheet" href="{:config('home_static')}/style/global.css" type="text/css">
	<link rel="stylesheet" href="{:config('home_static')}/style/header.css" type="text/css">
	<link rel="stylesheet" href="{:config('home_static')}/style/fillin.css" type="text/css">
	<link rel="stylesheet" href="{:config('home_static')}/style/footer.css" type="text/css">

	<script type="text/javascript" src="{:config('home_static')}/js/jquery.js"></script>
	<script type="text/javascript" src="{:config('home_static')}/js/cart2.js"></script>
	<script type="text/javascript" src="{:config('home_static')}/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="/plugin/layer/layer.js"></script>

</head>
<body>
	<!-- 顶部导航 start -->
	{include file="public/nav" />}
	<!-- 顶部导航 end -->

	<div style="clear:both;"></div>

	<!-- 页面头部 start -->
	<div class="header w990 bc mt15">
		<div class="logo w990">
			<h2 class="fl"><a href="{:url('home/index/index')}"><img src="{:config('home_static')}/images/logo.png" alt="京西商城"></a></h2>
			<div class="flow fr flow2">
				<ul>
					<li>1.我的购物车</li>
					<li class="cur">2.填写核对订单信息</li>
					<li>3.成功提交订单</li>
				</ul>
			</div>
		</div>
	</div>
	<!-- 页面头部 end -->

	<div style="clear:both;"></div>

	<!-- 主体部分 start -->
	<div class="fillin w990 bc mt15">
		<div class="fillin_hd">
			<h2>填写并核对订单信息</h2>
		</div>

		<div class="fillin_bd">
			<!-- 收货人信息  start-->
			<div class="address">
				<div class="address_select">
					<form action="" method="post"  name="address_form">
						<ul>
							<li>
								<label for=""><span>*</span>收 货 人：</label>
								<input type="text" name="receiver" class="txt" />
							</li>
							<li>
								<label for=""><span>*</span>收货地址：</label>
								<input type="text" name="address" class="txt" />
							<li>
								<label for=""><span>*</span>电话：</label>
								<input type="text" name="tel" class="txt"  />
							</li>
							<li>
								<label for=""><span>*</span>邮编：</label>
								<input type="text" name="zcode" class="txt" />
							</li>
						</ul>
					</form>

				</div>
			</div>
			<!-- 收货人信息  end-->



			<!-- 商品清单 start -->
			<div class="goods">
				<h3>商品清单</h3>
				<table>
					<thead>
						<tr>
							<th class="col1">商品</th>
							<th class="col2">规格</th>
							<th class="col3">价格</th>
							<th class="col4">数量</th>
							<th class="col5">小计</th>
						</tr>
					</thead>
					<tbody>
						<?php $total_price = 0;  foreach($cartData as $data): ?>
						<tr>
							<td class="col1"><a href="{:url('home/goods/detail',['goods_id'=>$data['goods_id']])}"><img src="/upload/{:json_decode($data['goodsInfo']['goods_middle'])[0]}" alt="" /></a>  <strong><a href="">{$data['goodsInfo']['goods_name']}</a></strong></td>
							<td class="col2"> {$data['attrInfo']['singleAttr']} </td>
							<?php  $danjia = $data['goodsInfo']['goods_price']+$data['attrInfo']['attr_total_price']  ?>
							<td class="col3">￥<span>{$danjia}</span></td>
							<td class="col4">
								{$data['goods_number']}
							</td>
							<?php
								$danjiaTotal = $danjia*$data['goods_number'];
								$total_price += $danjiaTotal;
							?>
							<td class="col5">￥<span>{$danjiaTotal}</span></td>
						</tr>
						<?php  endforeach; ?>

					</tbody>
					<tfoot>
						<tr>
							<td colspan="5">
								<ul>
									<li>
										<span>{:count($cartData)}件商品，总商品金额：</span>
										<em>￥{$total_price}</em>
									</li>
								</ul>
							</td>
						</tr>
					</tfoot>
				</table>
			</div>
			<!-- 商品清单 end -->
		</div>
		<div class="fillin_ft">
			<a href="javascript:;" id="goPay"><span>提交订单</span></a>
			<p>应付总额：<strong>￥{$total_price}元</strong></p>

		</div>

	</div>
	<!-- 主体部分 end -->

	<div style="clear:both;"></div>
	<!-- 底部版权 start -->
	{include file="public/foot" /}
	<!-- 底部版权 end -->
</body>
<script type="text/javascript">
    //提交订单的事件
    $("#goPay").click(function(){
        //获取表单对象进行跳转提交
        $("form[name='address_form']").submit();
    });
</script>
</html>
